<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
	
	<table  id="balanceList"></table>
	
	<div id="balanceList_tool">
		<a href="#" class="easyui-linkbutton" iconCls="icon-reload" plain="true" onclick="javascript:$('#balanceList').datagrid('reload');">刷新</a>
	</div>
	<script>
	
	$.getJSON("./account/getAccounts",function(res){
		if(res.state == 200){
			console.log(res.data)
		}
	})
	
	var balanceList = $("#balanceList").datagrid({
		title:'余额列表',
		toolbar:"#balanceList_tool",
		singleSelect:false,
		collapsible:false,
		width:'98%',
		method:'get',
		url:'/account/getBalanceList',
	    columns:[[    
	        {field:'currency',title:'币种',halign:'center',width:150}, 
	        {field:'tradeBalance',title:'可用',halign:'center',align:'right',width:160,formatter: function(value,row,index){
	        	return accounting.format(value,8,",");
			}},  
	        {field:'frozenBalance',title:'冻结',halign:'center',align:'right',width:160,formatter: function(value,row,index){
	        	return accounting.format(value,8,",");
			}}
	    ]],
		filterBtnIconCls:'icon-myfilter',
		filterDelay:500
	});
	balanceList.datagrid('enableFilter', [{
		field:'currency',
		type:'text'
	},{
		field:'tradeBalance',
		type:'numberbox',
		op:['greaterorequal','lessorequal']
	},{
		field:'frozenBalance',
		type:'numberbox',
		op:['greaterorequal','lessorequal']
	}]);
	


	
	

	
	</script>